<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="therapyDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='therapyDetail.heading'/>"/>
    <meta name="menu" content="TherapyFormMenu"/>
</head>

<form:form commandName="therapy" method="post" action="therapyform.html" id="therapyForm">
<form:errors path="*" cssClass="error" element="div"/>
<form:hidden path="id"/>
<form:hidden path="patient.id"/>
<form:hidden path="pid"/>
<table align="center" width="100%">
	<tr>
		<td>

		     <li>
		        <appfuse:label styleClass="desc" key="therapy.synptom"/>
		        <form:errors path="synptom" cssClass="fieldError"/>
		        <form:textarea path="synptom" id="synptom" rows="3" cols="50"/>
		    </li>
        </td>
        <td>
		    <li>
		        <appfuse:label styleClass="desc" key="therapy.tonguepulse"/>
		        <form:errors path="tonguepulse" cssClass="fieldError"/>
		        <form:textarea path="tonguepulse" id="tonguepulse" rows="3" cols="30"/>
		    </li>
		</td>
	</tr>
	<tr>
		<td>
		    <li>
		        <appfuse:label styleClass="desc" key="therapy.formula"/>
		        <form:errors path="formula" cssClass="fieldError"/>
		        <form:textarea path="formula" id="formula" rows="5" cols="50" />
		    </li>
		</td>
		<td>
		    <li>
		        <div class="left">
			        <appfuse:label styleClass="desc" key="therapy.dosage"/>
			        <form:errors path="dosage" cssClass="fieldError"/>
			        <form:input path="dosage" id="dosage" cssClass="text small"/>
		        </div>
		        <div>
			        <appfuse:label styleClass="desc" key="therapy.tdate"/>
			        <form:errors path="dosage" cssClass="fieldError"/>
			        <form:input path="tdate" id="tdate" cssClass="text small"/>
		        </div>
		    </li>
		    <li class="buttonBar bottom">
		        <input type="submit" class="button" name="save" value="<fmt:message key="button.save"/>"/>
		        <c:if test="${not empty therapy.id}">
		        <input type="submit" class="button" name="delete" onclick="return confirmDelete('therapy')" 
		            value="<fmt:message key="button.delete"/>" />
		        </c:if>
		        <input type="button" class="button" name="cancel" onclick="location.href='javascript:history.go(-1);'" 
		        	value="<fmt:message key="button.cancel"/>"/>
		    </li>

		</td>
	</tr>
</table>
</form:form>

<script type="text/javascript">
    Form.focusFirstElement($('therapyForm'));
</script>